Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove un-display MUR disposition category #6047

Conversation

fec-jli
Copy link
Contributor

@fec-jli fec-jli commented Nov 6, 2024

Summary (required)

This PR add a new table (fecmur.ref_case_disposition_category) to store displayed final disposition categories for three cases (MUR, ADR and AF)

The new MUR disposition category list:
ref_case_disposition_category.csv

Required reviewers

1-2 developers

Impacted areas of the application

legal search endpoint

Completion criteria

  • Remove some unpublished mur disposition categories
  • reload all MUR documents on dev, stage, prod after deploy.

Related PRs

#5988
#5991

cms PR:
Update mur disposition ids

How to test

1)Checkout branch
2)Setup local ES
3Upload legal doc on local ES.
These commands for reference:
python cli.py create_index case_index
python cli.py delete_index case_index
python cli.py load_adrs
python cli.py load_admin_fines
python cli.py load_current_murs

python cli.py load_current_murs 8182

4)pytest and flask run

5)Test urls
http://127.0.0.1:5000/v1/legal/search/?type=murs&case_no=8182
there are 8 items under dispositions section that all mur_disposition_category_id": 6,

compare with prod:
https://api.open.fec.gov/v1/legal/search?type=murs&case_no=8182
&api_key=DEMO_KEY
There are 9 items under dispositions section (mur_disposition_category_id": 12,)
that include one unpublished dispositon mur_disposition_category_id": "37",

6)make sure filter by mur_disposition_category_id work correctly
http://127.0.0.1:5000/v1/legal/search/?type=murs&mur_disposition_category_id=6

7)test in dev (MUR documents already are upload to dev)
https://fec-dev-api.app.cloud.gov/v1/legal/search?type=murs&case_no=8182&api_key=DEMO_KEY

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.58%. Comparing base (8b93795) to head (aefd985).
Report is 7 commits behind head on release/public-20241112.

Additional details and impacted files
@@                     Coverage Diff                     @@
##           release/public-20241112    #6047      +/-   ##
===========================================================
- Coverage                    86.59%   86.58%   -0.02%     
===========================================================
  Files                           82       82              
  Lines                         9080     9088       +8     
===========================================================
+ Hits                          7863     7869       +6     
- Misses                        1217     1219       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@pkfec pkfec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fec-jli In docs.py you need to update the MUR_DISPOSITION_CATEGORY_DISCRIPTION constant to include just the new 18 disposition categories and remove the rest.


# Get the allowed displayed MUR disposition category list from table fecmur.ref_case_disposition_category
category_list = [dict(row) for row in conn.execute(CASE_DISPOSITION_CATEGORY, "MUR")]
# print(category_list):
Copy link
Contributor

@pkfec pkfec Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fec-jli can you remove the print statement and all the commented lines from this file after line#627? docs.py already have all the description i think

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, Thanks @pkfec

@fec-jli fec-jli changed the title Remove undisplayed MUR disposition category Remove undisplay MUR disposition category Nov 7, 2024
@fec-jli fec-jli force-pushed the feature/get_mur_adr_disposition_category_from_table branch from 916d7f1 to aefd985 Compare November 7, 2024 17:16
@fec-jli fec-jli changed the base branch from develop to release/public-20241112 November 7, 2024 17:18
@pkfec pkfec self-requested a review November 7, 2024 17:44
Copy link
Contributor

@pkfec pkfec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fec-jli mur_dispostion_category filter works as expected, thanks!

Copy link
Member

@cnlucas cnlucas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job @fec-jli, thank you for making these changes!

@cnlucas cnlucas merged commit c04fc41 into release/public-20241112 Nov 12, 2024
3 checks passed
@cnlucas cnlucas deleted the feature/get_mur_adr_disposition_category_from_table branch November 12, 2024 14:23
@fec-jli fec-jli changed the title Remove undisplay MUR disposition category Remove un-display MUR disposition category Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Remove unpublished final MUR disposition categories
3 participants